package com.weishu.banking.controller;


import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.weishu.common.core.web.domain.AjaxResult;
import com.weishu.core.caiwu.SearchBalancePage;
import com.weishu.core.entity.CwBalance;
import com.weishu.core.mapper.CwBalanceMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * 企业中心 *
 */
@RestController
@RequestMapping("/qi")
public class BankingEnterpriseController {


    @Autowired
    private CwBalanceMapper cwBalanceMapper;

    @RequestMapping("searchBalanceList")
    public AjaxResult searchBalance(Integer pageNo,Integer pageSize,SearchBalancePage param){
        PageHelper.startPage(pageNo, pageSize);
        List<CwBalance> cwBalances = cwBalanceMapper.searchBalance(param);
        System.out.println(cwBalances);
        PageInfo<CwBalance> info =new PageInfo<>(cwBalances);
        return AjaxResult.success(info);
    }


}
